#include "DbusZappyServer.h"

DbusZappyServer::DbusZappyServer( QObject *parent ) : QDBusAbstractAdaptor( parent )
{

}

DbusZappyServer::~DbusZappyServer( void )
{

}

void
DbusZappyServer::start( void )
{
    QMetaObject::invokeMethod( parent( ), "start" );
}

void
DbusZappyServer::stop(void )
{
    QMetaObject::invokeMethod( parent( ), "stop" );
}

ushort
DbusZappyServer::port( void ) const
{
    return qvariant_cast< ushort >( parent()->property("port") );
}

void
DbusZappyServer::setPort(ushort port)
{
    parent()->setProperty( "port", qVariantFromValue( port ) );
}

bool DbusZappyServer::isIpv6(void ) const
{
    return qvariant_cast< bool >( parent()->property("isIpv6") );
}

bool DbusZappyServer::isSSL(void ) const
{
    return qvariant_cast< bool >( parent()->property("isSSL") );
}
